<?php
/* ----------------------------------------------
Caloris: Administration Code Viewer

$Id$
$Author$

Prohlížeč kódu pro extenze
---------------------------------------------- */

require_once("../../../index.php");
Caloris\ACL::authenticate();

define('_MODULE_ACTIVE', 'modulemanager');

$fileName = $_GET["file"];

$content = '
<h1>Extenze ' . substr($fileName,0,-4) . '</h1>

<div style="border: 1px solid #e5e8ff; padding: 2px; overflow: hidden; width: 95%; margin-top: 10px;">
<div style="background-color: #F3F5FF; padding: 10px;">
' . Caloris\Text::highlight(Caloris\Text::caltag(Caloris\IO::get(_CALSET_PATHS_BASE . _CALSET_DIRS_EXTENSION . '/' . $fileName))) . '
</div>
</div>' . PHP_EOL;

$data["title"] = 'Extenze: Prohlížeč zdrojového kódu';

$tmpl = new Caloris\Template;
$tmpl->input($content);
$tmpl->renderHead($data);
echo $tmpl->renderBody('caloris-admin');